package huawei;
/*
* @Author: wanghongfucoder
* @Date:   2017-06-27 16:42:14
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-06-27 16:42:27
*/

import java.util.*;
public class Mappath{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            int m=sc.nextInt();
            int n=sc.nextInt();
            int[][] path=new int[m+1][n+1];
            for(int i=0;i<path.length;i++){
                path[i][0]=1;
            }
            for(int j=0;j<path[0].length;j++){
                path[0][j]=1;
            }
            for(int i=1;i<path.length;i++){
                for(int j=1;j<path[0].length;j++){
                    path[i][j]=path[i-1][j]+path[i][j-1];
                }
            }
            System.out.println(path[m][n]);
        }
        sc.close();
    }
}
